package com.registration.controller;

import com.registration.entity.ResultEntity;
import com.registration.entity.YlDepartment;
import com.registration.server.YlDepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 科室查询
 * */
@RestController
@RequestMapping("/department")
public class DepartmentController {

    @Autowired
    YlDepartmentService ylDepartmentService;

    @GetMapping("/findAll")
    public ResultEntity<List<YlDepartment>> findAll(){
        return new ResultEntity<List<YlDepartment>>(200,"查询成功",ylDepartmentService.findAll());
    }
}
